Natural gas, when recovered from a well, typically includes a mixture of gases and also includes carbon dioxide. For example, natural gas may include mole percentages of approximately 85% for methane, approximately 5% ethane, approximately 2% propane, and smaller percentages of other gases. The carbon dioxide component can affect the drilling, production and processing operations related to the recovery of natural gas. For example, the carbon dioxide can affect the quality of the drilling fluid. In addition, the carbon dioxide has to be removed during processing before it can be transported in a pipeline to customers. The cost of removing the carbon dioxide plus the cost of sequestering it can affect the economics of a well. Hence, it would be appreciated in the drilling industry if an amount of carbon dioxide in natural gas could be quickly and accurately determined.